#include "../include/Configuration.hpp"
#include "../include/Mylogger.hpp"
#include "../include/EchoServer.hpp"

#include <iostream>
#include <fstream>
#include <sstream>
#include <string>

using std::string;
using std::ifstream;
using std::stringstream;
using std::cout;
using std::endl;



int main()
{
    cdm::Configuration* conf = cdm::Configuration::getConfiguration("../conf/server.conf"); 
    LOG_INFO("Configuration create success");
    map<string,string> info = conf->getInfo();
    cdm::EchoServer ecServer(atoi(info["port"].c_str()),
                             info["ip"],
                             atoi(info["thread_num"].c_str()),
                             atoi(info["task_num"].c_str()));
    LOG_INFO("Reactor start");
    ecServer.start();
    return 0;
}

